<div class=framebox_quick_profile>
    <dl>
        <?php                                    
            $thumbnail = $this->PhpThumb->generate(
                array(
                    'save_path' => WWW_ROOT . 'img/uploads/Moderators/thumbs',
                    // Where to save the thumbnail. (Make sure it is writable by the web server)

                    'display_path' => 'uploads/Moderators/thumbs',
                    // The web accessible path to the directory that the thumbnail lives in after its created.

                    'error_image_path' => 'img/error.jpg',
                    // The default image to display if something goes wrong while generating a thumbnail. 

                    'src' => WWW_ROOT . "img/uploads/Moderators/" . $access->getmy('image'),
                    // The source image to be converted into a thumbnail.
                    // From here on out, you can pass any standard phpThumb parameters

                    'w' => 165,
                    'h' => 165,
                    'q' => 100,
                    'zc' => 1
                    //'fltr'=>array('ric|4|4')
                )
            );

        ?>        
        <dt><?php echo $this->Html->image($thumbnail['src'], array('width' => $thumbnail['w'], 'height' => $thumbnail['h'])); ?></dt>
        <dd>            
            <h2><?php echo $get_user_infor['firstname']. ' ' . $get_user_infor['lastname']; ?></h2>
            <table>
                <tr>
                    <td colspan="2" width="30%">Ranks <span blue class=medium>#<?php echo $rank['rank'] ?></span> in points</td>
                    <td width="70%">level: <span blue class=large><?php echo $level ?></span></td>
                </tr>
                <tr>
                    <td width="30%">has <span blue><?php echo $points ?></span> points</td>
                    <td width="30%">rated <span blue><?php echo $subjects_rated ?></span> subjects</td>
                    <td width="30%">added <span blue><?php echo $subject_added ?></span> subjects</td>
                </tr>
                <tr>
                    <td colspan="3"><?php echo date('F d, Y', strtotime($userdetail['User']['created'])) ?></td>
                </tr>
            </table>
        </dd>
    </dl>
</div>

<div class=framebox_featured_subjects>
    <dl>
        <dt>
        Featured<br>
        Subjects
        </dt>
        <dd>
            <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"></script>
            <a class="facebook" name="fb_share" type="button" href="http://www.facebook.com/share">Share</a>
        </dd>
    </dl>
    <table>
        <?php
    if($userdetail['User']['public_fs'])
    {
        $total = count($feature_subjects);
        if ($total > 0) {
            ?>
            <tr>
                <?php
                if ($total <= 10)
                    $limit = $total;
                else
                    $limit = 10;
                for ($i = 0; $i < $limit; $i++) {
                    $subject = $feature_subjects[$i];
                    $thumbnail = $this->PhpThumb->generate(
                            array(
                                'save_path' => WWW_ROOT . 'img/uploads/Subjects/thumbs',
                                // Where to save the thumbnail. (Make sure it is writable by the web server)

                                'display_path' => 'uploads/Subjects/thumbs',
                                // The web accessible path to the directory that the thumbnail lives in after its created.

                                'error_image_path' => 'error.jpg',
                                // The default image to display if something goes wrong while generating a thumbnail. 

                                'src' => WWW_ROOT . "img/uploads/Subjects/" . $subject['image'],
                                // The source image to be converted into a thumbnail.
                                // From here on out, you can pass any standard phpThumb parameters

                                'w' => 65,
                                'h' => 65,
                                'q' => 100,
                                'zc' => 1
                            //'fltr'=>array('ric|4|4')
                            )
                    );
                    ?>
                    <td>
                        <a href="<?php echo $this->base ?>/subjects/subject/<?php echo $subject['subject_id'] ?>">
                            <?php echo $this->Html->image($thumbnail['src'], array('width' => $thumbnail['w'], 'height' => $thumbnail['h'], 'title' => $subject['subject_name'], 'alt' => $subject['subject_name'])); ?>
                        </a>
                    </td>
                <?php } ?>
            </tr>
            <?php
        }
        if ($total >= 11) {
            ?>
            <tr>
                <?php
                if ($total <= 20)
                    $limit = $total;
                else
                    $limit = 20;
                for ($i = 10; $i < $limit; $i++) {
                    $subject = $feature_subjects[$i];
                    $thumbnail = $this->PhpThumb->generate(
                            array(
                                'save_path' => WWW_ROOT . 'img/uploads/Subjects/thumbs',
                                // Where to save the thumbnail. (Make sure it is writable by the web server)

                                'display_path' => 'uploads/Subjects/thumbs',
                                // The web accessible path to the directory that the thumbnail lives in after its created.

                                'error_image_path' => 'error.jpg',
                                // The default image to display if something goes wrong while generating a thumbnail. 

                                'src' => WWW_ROOT . "img/uploads/Subjects/" . $subject['image'],
                                // The source image to be converted into a thumbnail.
                                // From here on out, you can pass any standard phpThumb parameters

                                'w' => 65,
                                'h' => 65,
                                'q' => 100,
                                'zc' => 1
                            //'fltr'=>array('ric|4|4')
                            )
                    );
                    ?>
                    <td>
                        <a href="<?php echo $this->base ?>/subjects/subject/<?php echo $subject['subject_id'] ?>">
                            <?php echo $this->Html->image($thumbnail['src'], array('width' => $thumbnail['w'], 'height' => $thumbnail['h'], 'title' => $subject['subject_name'], 'alt' => $subject['subject_name'])); ?>
                        </a>
                    </td>
                <?php } ?>
            </tr>
            <?php
        }
    }
        ?>
    </table>
</div>

<div class=framebox_main_profile>
    <table>
        <tr>
            <td width="35%">
                <h4>About Me</h4>
                <p><?php echo $get_user_infor['About'] ?></p>
            </td>
            <td width="27.5%">
                <dl>
                    <dt>Gender</dt>
                    <dd><?php
        if ($trans_user_info['Gender'] != "") {
            echo $trans_user_info['Gender'];
        } else {
            echo "none";
        }
        ?></dd>
                    <dt>Date of Birth</dt>
                    <dd><?php
                        if ($get_user_infor['birthday'] != "") {
                            echo $get_user_infor['birthday'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>Country</dt>
                    <dd><?php
                        if ($trans_user_info['Country'] != "") {
                            echo $trans_user_info['Country'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>State</dt>
                    <dd><?php
                        if ($trans_user_info['State'] != "") {
                            echo $trans_user_info['State'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>City</dt>
                    <dd><?php
                        if ($trans_user_info['City'] != "") {
                            echo $trans_user_info['City'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>Race</dt>
                    <dd><?php
                        if ($trans_user_info['Race'] != "") {
                            echo $trans_user_info['Race'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>Sexual <br> Orientation</dt>
                    <dd><?php
                        if ($trans_user_info['Sexual'] != "") {
                            echo $trans_user_info['Sexual'];
                        } else {
                            echo "none";
                        }
        ?></dd>	
                </dl>
            </td>
            <td width="37.5%">
                <dl>
                    <dt>Religion</dt>
                    <dd><?php
                        if ($trans_user_info['Religion'] != "") {
                            echo $trans_user_info['Religion'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>Marital Status</dt>
                    <dd><?php
                        if ($trans_user_info['Marital'] != "") {
                            echo $trans_user_info['Marital'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>Income</dt>
                    <dd><?php
                        if ($trans_user_info['Income'] != "") {
                            echo $trans_user_info['Income'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>Occupation</dt>
                    <dd><?php
                        if ($trans_user_info['Occupation'] != "") {
                            echo $trans_user_info['Occupation'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>Education</dt>
                    <dd><?php
                        if ($trans_user_info['Education'] != "") {
                            echo $trans_user_info['Education'];
                        } else {
                            echo "none";
                        }
        ?>
                    </dd>	

                    <dt>Pet Owner</dt>
                    <dd><?php
                        if ($trans_user_info['Pet'] != "") {
                            echo $trans_user_info['Pet'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>Are you a Parent?</dt>
                    <dd><?php
                        if ($trans_user_info['Parent'] != "") {
                            echo $trans_user_info['Parent'];
                        } else {
                            echo "none";
                        }
        ?></dd>	

                    <dt>Website</dt>
                    <dd><?php
                        if ($get_user_infor['Website'] != "") {
                            echo $get_user_infor['Website'];
                        } else {
                            echo "none";
                        }
        ?></dd>	
                </dl>
            </td>
        </tr>
    </table>
</div>
